﻿using FluentNHibernate.Mapping;

namespace Genesis.Persistence.Mapping
{

    using Genesis.Domain;

    public class UserMap : ClassMap<User>
    {

        public UserMap()
        {

            Id(x => x.Id);
            Map(x => x.Username);
            Map(x => x.Password);
            Map(x => x.Email);
            Map(x => x.DisplayName);
            Map(x => x.ShowEmail);
            Map(x => x.ShowDisplayName);
            Map(x => x.HomePage);
            Map(x => x.AimAddress);
            Map(x => x.MsnAddress);
            Map(x => x.YimAddress);
            Map(x => x.AvatarUrl);
            Map(x => x.Signature);
            Map(x => x.JoinDate);
            Map(x => x.JoinAddress);
            Map(x => x.ActivateCode);
            Map(x => x.ActivateDate);
            Map(x => x.ActivateAddress);
            Map(x => x.LastVisitDate);
            Map(x => x.LastVisitAddress);
            Map(x => x.LastSearchDate);
            Map(x => x.LastSearchAddress);
            Map(x => x.LoginAttempts);
            Map(x => x.IsLockedOut);
            Map(x => x.UnlockDate);
            Map(x => x.IsApproved);
            HasMany<Favorite>(x => x.Favorites);
            HasMany<Subscription>(x => x.Subscriptions);

        }

    }

}